<template>
  <view>
    <wx-map :longitude="longitude" :latitude="latitude" style="width: 100vw; height: 100vh;">
      <wx-markers v-for="(marker, index) in markers" :key="index" :latitude="marker.latitude" :longitude="marker.longitude">
        <image :src="marker.iconPath" style="width: {{marker.width}}px; height: {{marker.height}}px;"></image>
      </wx-markers>
    </wx-map>
  </view>
</template>

<script>
export default {
  data() {
    return {
      longitude: 116.397428,
      latitude: 39.90923,
      markers: [
        {
          iconPath: "/static/location.png",
          id: 0,
          latitude: 39.90923,
          longitude: 116.397428,
          width: 50,
          height: 50
        }
      ]
    };
  }
};
</script>